{% extends 'admin/base.html' %}

{% block main %}
    <div class="layui-fluid" style="margin:10px 0px">
        <form class="layui-form layui-form-pane" action="/admin/post" method="post">
            <div class="layui-row layui-col-space20">
                {{ post_form.csrf_token }}
                <div class="layui-col-lg8">
                    <div class="layui-row">
                        <div class="layui-col-lg12">
                            <div class="layui-col-lg8">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">文章标题</label>
                                    <div class="layui-input-block">
                                        {{ post_form.title(class="layui-input",placeholder="请输入文章标题") }}
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label class="layui-form-label">文章别名</label>
                                    <div class="layui-input-block">
                                        {{ post_form.slug(class="layui-input",placeholder="请输入文章标题别名") }}
                                    </div>
                                </div>
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">文章摘要 </label>
                                    <div class="layui-input-block">
                                        {{ post_form.excerpt(class="layui-textarea",placeholder="请输入摘要") }}
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-lg4">
                                <div class="layui-upload-list">
                                    <img class="layui-upload-img">
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-lg12">

                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">文章正文</label>
                                <div class="layui-input-block">
                                    {{ post_form.content(class="layui-textarea",placeholder="请输入内容") }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="layui-col-lg4">
                    <div class="layui-row">
                        <div class="layui-col-lg12">
                            <div class="layui-form-item">
                                <label class="layui-form-label">文章分类</label>
                                <div class="layui-input-block">
                                    {{ post_form.categoryid }}
                                </div>
                            </div>
                            <div class="layui-form-item" pane="">
                                <label class="layui-form-label">文章标签</label>
                                <div class="layui-input-block">

                                </div>
                            </div>
                            <div class="layui-form-item" pane="">
                                <label class="layui-form-label">发布状态</label>
                                <div class="layui-input-block layui-inline">
                                    {{ post_form.status }}

                                    <!-- <input type="radio" name="sex" value="True" title="立即发布" checked="">
                                    <input type="radio" name="sex" value="Flase" title="保存草稿"> -->
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button type="submit" class="layui-btn" lay-submit="">发布</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">保存</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>

    </div>
{% endblock %}
{% block script %}
    {{ super() }}
    <script src="{{ url_for('static', filename='ckeditor/ckeditor.js') }}"></script>
{% endblock %}
